import request from '@/utils/request';

/**
 * 进度管理甘特图
 */
export const getGanttInfo = (params: any) => request({
    url: '/system/scheduleFormation/ganttInfo',
    method: 'get',
    params,
});

/**
 * 查询计划列表
 *
 * @param pageNum
 * @param pageSize
 */
export const getPlanList = (params: any) => request({
    url: '/system/scheduleFormation/list',
    method: 'get',
    params,
});

/**
 * 查询计划详情
 *
 * @param pageNum
 * @param pageSize
 */
export const getPlanDetail = (id: any) => request({
    url: `/system/scheduleFormation/${id}`,
    method: 'get',
});

/**
 * 添加计划
 */
export const addPlan = (data: any) => request({
    url: '/system/scheduleFormation',
    method: 'post',
    data,
});

/**
 * 修改计划
 */
export const modifyPlan = (data: any) => request({
    url: '/system/scheduleFormation',
    method: 'put',
    data,
});

/**
 * 删除计划
 */
export const deletPlan = (id: any) => request({
    url: `/system/scheduleFormation/${id}`,
    method: 'delete',
});

/**
 * 查询任务列表
 *
 * @param pageNum
 * @param pageSize
 */
export const getTaskList = (params: any) => request({
    url: '/system/scheduleTask/list',
    method: 'get',
    params,
});

/**
 * 查询任务详情
 *
 */
export const getTaskDetail = (id: any) => request({
    url: `/system/scheduleTask/${id}`,
    method: 'get',
});

/**
 * 添加任务
 */
export const addTask = (data: any) => request({
    url: '/system/scheduleTask',
    method: 'post',
    data,
});

/**
 * 修改任务
 */
export const modifyTask = (data: any) => request({
    url: '/system/scheduleTask',
    method: 'put',
    data,
});

/**
 * 删除任务
 */
export const deletTask = (id: any) => request({
    url: `/system/scheduleTask/${id}`,
    method: 'delete',
});
